public class ReverseString {

    public void solution(char[] s) {
        int left=0;
        int right=s.length-1;

        while (left<right){
            s[left] ^= s[right];
            s[right] ^= s[left];
            s[left] ^= s[right];

            left++;
            right--;
        }
    }
}
